12. Exercise: Pull Data from YFinance API
You can't build trading models without financial data! A common source for data are APIs, which are a programmatic way to pull a lot of data from data brokers and vendors that make it available online.
While many APIs will require an API key or token to identify you, you can use the YahooFinance API without a key for pulling simple and small amounts of historical data.
Your task here is to:
- If necessary, download the YahooFinance API Python wrapper package (called
yfinance) - Use the
yfinancepackage to download historical data for the last 3 years for at least 2 different stock tickers - Choose your favorite stocks to explore!